import request from '@/config/axios'
/**
 * 分页查询房间信息
 */
export const roomQuery = (params) => {
  return request.get({ url: '/bed/bed-info/room-query', params })
}

/**
 * 查询单个房间
 */
export const getRoom = (id) => {
  return request.get({ url: '/bed/bed-info/get-room?id=' + id })
}

/**
 * 获取单个床位
 */
export const getBed = (id) => {
  return request.get({ url: '/bed/bed-info/get-bed?id=' + id })
}

/**
 * 分页查询房间类型
 */
export const roomTypeQuery = (params) => {
  return request.get({ url: '/bed/bed-info/room-type-query', params })
}

/**
 * 创建房间类型
 */
export const roomTypeCreate = (data) => {
  return request.post({ url: '/bed/bed-info/room-type-create', data })
}

/**
 * 更新房间类型
 */
export const roomTypeUpdate = (data) => {
  return request.put({ url: '/bed/bed-info/room-type-update', data })
}

/**
 * 删除房间类型
 */
export const roomTypeDeleted = (id) => {
  return request.delete({ url: '/bed/bed-info/room-type-deleted?id=' + id })
}

/**
 * 分页查询床位类型
 */
export const bedTypeQuery = (params) => {
  return request.get({ url: '/bed/bed-info/bed-type-query', params })
}

/**
 * 创建房间类型
 */
export const bedTypeCreate = (data) => {
  return request.post({ url: '/bed/bed-info/bed-type-create', data })
}

/**
 * 更新床位类型
 */
export const bedTypeUpdate = (data) => {
  return request.put({ url: '/bed/bed-info/bed-type-update', data })
}

/**
 * 删除床位类型
 */
export const bedTypeDeleted = (id) => {
  return request.delete({ url: '/bed/bed-info/bed-type-deleted?id=' + id })
}

/**
 * 创建房间
 */
export const roomCreate = (data) => {
  return request.post({ url: '/bed/bed-info/room-create', data })
}

/**
 * 更新房间信息
 */
export const roomUpdate = (data) => {
  return request.put({ url: '/bed/bed-info/room-update', data })
}

/**
 * 删除房间信息
 */
export const roomDeleted = (id) => {
  return request.delete({ url: '/bed/bed-info/room-deleted?id=' + id })
}

/**
 * 创建床位信息
 */
export const create = (data) => {
  return request.post({ url: '/bed/bed-info/create', data })
}

/**
 * 获取单个
 */
export const singleGetBedType = (id) => {
  return request.get({ url: '/bed/bed-info/single-get-bed-type?id=' + id })
}

/**
 * 获取单个房间类型
 */
export const singleGetRoomType = (id) => {
  return request.get({ url: '/bed/bed-info/single-get-room-type?id=' + id })
}

/**
 * 查询床位类型
 */
export const listQueryBedType = () => {
  return request.get({ url: '/bed/bed-info/list-query-bed-type' })
}

/**
 * 查询房屋类型
 */
export const listQueryRoomType = () => {
  return request.get({ url: '/bed/bed-info/list-query-room-type' })
}

/**
 * 根据roomID获取床位信息
 */
export const getByRoomId = (id) => {
  return request.get({ url: '/bed/bed-info/get-by-room-id?id=' + id })
}

/**
 * 分页查询
 */
export const pageQuery = (params) => {
  return request.get({ url: '/bed/bed-info/page-query', params })
}
